home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Auto Destruct Objects < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.7 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Auto Destruct Objects
  2. Sent:        6/27/96 9:20 AM
  3. Received:    6/27/96 9:26 AM
  4. From:        Henri Lamiraux, lamiraux@apple.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >Hi:
  9. >
  10. >I have just started using ODF and have started working on a part editor. The
  11. >question I have is about auto destruct objects. The documentation is a little
  12. >vague on how they work. My question is, is there any scope with respect to
  13. >which auto destruct objects are deleted for a given exception or are all auto
  14. >destruct objects deleted for any exception? This may be a problem since many
  15. >of ODF's objects are auto destruct. Also, what happends when an auto destruct
  16. >object such as FW_CString255 is a member of another class and the string
  17. >object is allocated as part of the class (i.e. FW_CString255       fText)?
  18. >
  19. >Thanks in advance
  20. >
  21. >Scott Champ
  22. >
  23. >Sciex
  24. >71 Four Valley Drive
  25. >Concord, Ontario, Canada
  26. >L4K-4V8
  27.  
  28. Auto-destruct object in ODF behaves exactly the same way as standard C++ 
  29. objects with a compiler supporting exception. With compilers like 
  30. Metrowerks or visual C++ which supports exception you can turn off the 
  31. ODF emulation exception and use the compiler native exception. In this 
  32. case ODF is better following the same rules otherwise you would not have 
  33. the same behavior with emulation and native exception. Look at any C++ 
  34. manual covering exceptions and you can apply that to ODF.
  35.  
  36. ........................................................................
  37.  Henri Lamiraux                                      lamiraux@apple.com
  38.  Apple Computer, Inc.                 OpenDoc(tm) Development Framework
  39. ........................................................................
  40.  
  41.